import http from '../request'

export default {
  // 获取分类title
  async getSongListCategory() {
    return await http.get('/songlist/category')
  },
  // 按分类获取歌单
  async getSongLists({ id, pageNo, pageSize, sort }) {
    return await http.get(`/songlist/list?category${id}&pageNo=${pageNo}&pageSize=${pageSize}&sort=${sort}`)
  },
  // 获取歌单详情
  async getSonglistInfo(id) {
    return await http.get(`/songlist?id=${id}`)
  },
  // 获取单个歌曲信息
  async getSonginfo(id) {
    return await http.get(`/song?songmid=${id}`)
  },
  // 获取评论
  async getComments({ id, pageNo, pageSize, type, biztype }) {
    return await http.get(`/comments?id=${id}&pageindex=${pageNo}&pageSize=${pageSize}&type=${type}$biztype=${biztype}`)
  },
  // 获取歌词
  async getSongWords(id) {
    return await http.get(`/lyric?songmid=${id}`)
  }
}
